//
//  Person.m
//  oc_1
//
//  Created by 楼楚 on 15/9/8.
//  Copyright (c) 2015年 Chu Lou. All rights reserved.
//

#import "Person.h"

@implementation Person
{
    //写成员变量
}

- (id) init
{
    if (self = [super init]){   //super 表示父类，init方法 第一步分配内存空间 第二部内存空间指向self
        age = 30;               //self 表示对象本身
        height = 178.0;
        name = @"hehehe";
    }
    return self;
    
    }
- (id) initWithAge:(int)newAge
{
    if (self = [super init]) {
        age = newAge;
        height = 178;
        name = @"hehehe";
        
    }
    return self;
    
}

- (id) initWithAge:(int)newAge andHeight:(float)newHeight
{
    if (self = [super init]) {
        age = newAge;
        height = newHeight;
        name = @"hehehe";
        
    }
    return self;
    
}

- (void) setAge:(int)newAge
{
    age = newAge;
}
- (void) setHeight:(float)newHeight
{
    height = newHeight;
    
}
- (void) setAge:(int)newAge andHeight:(float)newHeight
{
    age = newAge;
    height = newHeight;
    
}

-(int) getAge


{
    return age;
    
}
- (float) getHeight
{
    return height;
}
- (NSString *) getName
{
    return name;
}
@end
